package phapp.dao.barapp;

import java.util.List;

import javacommon.base.*;
import cn.org.rapid_framework.page.*;
import org.springframework.stereotype.Component;

import phapp.model.barapp.*;

/**
  * Title: tc_tjfirms_info 数据处理层
  * Description : 执行./mapper/的TjfirmsMapper.xml的相应SQL语句
  * Copyright: Copyright (c) 2012-10
  * Company:
  *
  * @author you name
  * @version 1.0
*/

@Component
public class TjfirmsDao extends BaseIbatis3Dao<Tjfirms,java.lang.Integer>{

   public Class getEntityClass() {
      return Tjfirms.class;
   }

   public void saveOrUpdate(Tjfirms entity) {
      if(entity.getId() == null)
         save(entity);
      else
         update(entity);
   }

   /**
   * <p>批量删除<br>
   * Description :
   * @param Tjfirms u
   * @return int
   * @author
   */
   public int removeByIdArry(Tjfirms u) {
      int i=-1;
      i =delete("Tjfirms.removeByIdArry", u);
      return i;
   }
   /**
   * <p>分页查询<br>
   * Description :
   * @param PageRequest pageRequest
   * @return Page
   * @author
   */
   public Page findByPageRequest(PageRequest pageRequest) {
      return pageQuery("Tjfirms.pageSelect",pageRequest);
   }


   /**
   * <p>按Bean查询返回List<br> 
   * @param Tjfirms bean
   * @return List
   * @author
   */
   public java.util.List findListByBean(Tjfirms bean){
	   return  getSqlSessionTemplate().selectList("Tjfirms.findListByBean",bean);
   }
   /**
	* <p>通过 Map 修改一条 数据<br> 
	* @param  java.util.Map 
   */
   public int updateByMap(java.util.Map map){
  		int count = getSqlSessionTemplate().update("Tjfirms.update",map);
  		return count;
  }

}
